package user

import (
	"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
	"github.com/flipped-aurora/gin-vue-admin/server/model/entity/user/request"
	"github.com/gin-gonic/gin"
)

type UserApi struct {
}

// 查询返回作者信息
func (userApi *UserApi) FindAuthorPage(c *gin.Context) {
	var req request.AuthorPageReq
	err := c.ShouldBindJSON(&req)
	if err != nil {
		response.FailWithMessage("参数绑定有误", c)
		return
	}
	//把用户查询到的结果返回给页面
	resp, err := userService.FindAuthorPage(&req)
	// 接口数据返回
	response.OkWithData(resp, c)
}
